package cn.wolfcode.repository;

import cn.wolfcode.domain.Banner;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * 区域持久化接口
 */
public interface BannerRepository extends MongoRepository<Banner, String> {

    /**
     * 通过状态和类型查询banner
     * @param state
     * @param type
     * @param pageable
     * @return
     */
    List<Banner> findByStateAndType(int state, int type, Pageable pageable);
}
